<div>
	{% if not jobs %}
	<div class="highlight ui-state-highlight">You need at least one completed job to create a report</div>
	{% else %}
	<form action="/new/report/?pid={{ project.id }}" method="POST">
		<div class='formfieldcontainer'>
                        <label class="fieldlabel" style="width:160px;">Report name :</label>
                	<input name="name" required="required" />
		</div>

		<div class='formfieldcontainer'>
			<label class="fieldlabel" style="width:160px;">Select Job :</label>
			<select name='jid'>
				{% for job in jobs %}
				<option value="{{ job.id }}">{{ job.name }}</option>
				{% endfor %}
			</select>
		</div>
	
		<div class='formfieldcontainer'>
			<label class="fieldlabel" style="width:160px;">Select Report Algo :</label>
                        <select name='rid'>
                                {% for algo in algos %}
                                <option value="{{ algo.id }}">{{ algo.name }}</option>
                                {% endfor %}
                        </select>
		</div>
		
		<div class='formfieldcontainer'>
                        <label class='fieldlabel' style="width:150px;">Privacy Settings : </label>
                        <input type="radio" name="permission" value="0" checked>Private
                        <input type="radio" name="permission" value="1">Read to all
                        <input type="radio" name="permission" value="2">Open Source
                </div>

		<div class='formfieldcontainer'>
			<input type="submit" value="Create" class="button-base button-blue button-small" style="margin-left:50px;" />
		</div>
	</form>
	{% endif %}
</div>
